package com.example.websocket.config;

import com.example.websocket.interceptors.LoginInterceptor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

import java.util.ArrayList;
import java.util.List;

/**
 * @ author 韩
 * time: 2024/2/17 4:23
 */
@Configuration
public class WebConfig implements WebMvcConfigurer {

//    @Autowired
//    private LoginInterceptor loginInterceptor;
//
//    @Override
//    public void addInterceptors(InterceptorRegistry registry) {
//        List<String> patterns = new ArrayList<>();
//        patterns.add("/user/login");
//        patterns.add("/user/register");
//        registry.addInterceptor(loginInterceptor).excludePathPatterns(patterns);
//    }
}
